package com.googlecode.jvmpart.support;

import java.util.Map;

import com.googlecode.jvmpart.Partitioner;
import com.googlecode.jvmpart.ProcessExecution;
import com.googlecode.jvmpart.proc.JvmProcessException;

public abstract class AbsPartitioner implements Partitioner {
	private int capacity;
	public int getCapacity() {
		return capacity;
	}
	public String getJvmProcessName() {
		return ProcessExecution.PID+"_"+this.getClass().getSimpleName();
	}
	public Map<String, Map<String, Object>> partition(int capacity) throws JvmProcessException {
		this.capacity = capacity;
		return doPartition();
	}	
	public abstract Map<String, Map<String, Object>> doPartition() throws JvmProcessException;
}
